Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.wpi.cetask
Class Decomposition.Step

    java.lang.Object
      edu.wpi.cetask.Task
          edu.wpi.cetask.Decomposition.Step

Enclosing class:
  Decomposition

    public class Decomposition.Step

extends Task

Field Summary
`protected javax.script.Bindings` | `bindings`
`protected TaskEngine` | `engine`

Method Summary
`void` | `deleteSlotValue(String name)` Make named slot undefined.
`protected Object` | `eval(String script, javax.script.Bindings extra, String where)`
`protected Object` | `eval(String expression, String where)`
`protected Boolean` | `evalCondition(String expression, String where)`
`Decomposition` | `getDecomposition()`
`String` | `getName()`
`void` | `setSlotValue(String name, Object value)` Set the value of named slot to given value. Note that the given Java object must be converted to a JavaScript object for storage.
`void` | `setSlotValueScript(String name, String expression, String where)` Set the value of named slot to result of evaluating given JavaScript expression.
`String` | `toString()`

Methods inherited from class edu.wpi.cetask.Task
`checkSlotValue, checkSlotValueScript, copySlotValue, copySlotValues, format, getDecompositions, getExternal, getProperty, getScript, getSlotValue, getSlotValueToString, getSuccess, getType, getWhen, isAchieved, isApplicable, isDefinedInputs, isDefinedOutputs, isDefinedSlot, matches, occurred, setBooleanSlotValue, setExternal, setIntSlotValue, setStringSlotValue, setSuccess, setWhen, toStringVerbose`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### engine

    protected final TaskEngine engine

### bindings

    protected final javax.script.Bindings bindings

Method Detail

### getName

    public String getName()

### getDecomposition

    public Decomposition getDecomposition()

### eval

    protected Object eval(String expression,
                          String where)

### eval

    protected Object eval(String script,
                          javax.script.Bindings extra,
                          String where)
                   throws javax.script.ScriptException

  Throws:
    `javax.script.ScriptException`

### setSlotValue

    public void setSlotValue(String name,
                             Object value)

  Description copied from class: `Task`
  Set the value of named slot to given value.
  Note that the given Java object must be converted to a JavaScript object for storage. Refer to Chapter 12 of O'Reilly JavaScript guide for details of conversion, but note following subtleties here:
  - Java objects and arrays (i.e., everything but numbers and booleans) convert to instances of JavaObject and JavaArray
  - Specifically, Java strings convert to instances of JavaObject (not JavaScript strings!)

  Overrides:
    `setSlotValue` in class `Task`
  See Also:
    `Task.getSlotValue(String)`, `Task.setSlotValueScript(String,String,String)`

### setSlotValueScript

    public void setSlotValueScript(String name,
                                   String expression,
                                   String where)

  Description copied from class: `Task`
  Set the value of named slot to result of evaluating given JavaScript expression. This method avoids issues of conversion from Java to JavaScript objects.

  Overrides:
    `setSlotValueScript` in class `Task`
  See Also:
    `Task.setSlotValue(String,Object)`

### deleteSlotValue

    public void deleteSlotValue(String name)

  Description copied from class: `Task`
  Make named slot undefined.

  Overrides:
    `deleteSlotValue` in class `Task`
  See Also:
    `Task.isDefinedSlot(String)`

### evalCondition

    protected Boolean evalCondition(String expression,
                                    String where)

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD